// 判断浏览器类型
let userAgent = '';
if (typeof navigator !== 'undefined') {
  userAgent = navigator.userAgent.toLowerCase();
}

export const isWx = userAgent.indexOf('micromessenger') > -1;

// 判断json字符串
export function isJsonStr(str) {
  try {
    if (typeof JSON.parse(str) === 'object') {
      return true;
    }
  } catch (e) {
  }
  return false;
}

